how to grab nodes inside the dom using javascript